<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script src="./03-ec.js"></script>

  <script>
    async function async1() {
      console.log("AAAA");
      await async2();    //  new Promise(function (resolve) { resolve(undefined) })
      console.log("BBBB");
    }
    async function async2() {
      console.log("CCCC");

    }

    console.log("DDDD");
    setTimeout(function () {
      console.log("FFFF");
    }, 0);
    async1();
    new Promise(function (resolve) {
      console.log("GGGG");
      resolve();
    }).then(function () {
      console.log("HHHH");
    });
    console.log("IIII");
  </script>
</body>
</html>